from django.db import models
from django.utils import timezone


# Create your models here.
class Clazz(models.Model):
    name = models.CharField(max_length=100, db_comment='班级名称')
    duration = models.FloatField(db_comment='课程时长')
    mange_name = models.CharField(max_length=100, db_comment='班主任')
    start_time = models.DateTimeField(db_comment='开班时间')
    state = models.BooleanField(db_comment='班级状态', default=False)
    create_time = models.DateTimeField(db_comment='录入时间', default=timezone.now, blank=True, null=True)
    update_time = models.DateTimeField(db_comment='修改时间', blank=True, null=True)
    delete_time = models.DateTimeField(db_comment='删除时间', blank=True, null=True)
    is_delete = models.BooleanField(db_comment='是否删除', default=False)

    class Meta:
        db_table = 'tb_clazz'
